home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form1
- Caption = "Form2"
- ClientHeight = 3885
- ClientLeft = 3225
- ClientTop = 1470
- ClientWidth = 5775
- LinkTopic = "Form2"
- ScaleHeight = 3885
- ScaleWidth = 5775
- Begin VB.CommandButton Command4
- Caption = "Close"
- Height = 735
- Left = 3960
- TabIndex = 3
- Top = 2160
- Width = 1455
- End
- Begin VB.CommandButton Command3
- Caption = "Custom"
- Height = 735
- Left = 720
- TabIndex = 2
- Top = 2160
- Width = 1455
- End
- Begin VB.CommandButton Command2
- Caption = "Preview"
- Height = 735
- Left = 3960
- TabIndex = 1
- Top = 720
- Width = 1455
- End
- Begin VB.CommandButton Command1
- Caption = "Print"
- Height = 735
- Left = 720
- TabIndex = 0
- Top = 720
- Width = 1455
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Const s = "c:\crw\Test1.rpt"
- Dim h, r As Integer
- Const xleft = 20, xtop = 10, xwidth = 700, xheight = 550
- Private Sub Command1_Click()
- r = PEPrintReport(s, 1, 0, "", 0, 0, 0, 0, 0, 0)
- End Sub
- Private Sub Command2_Click()
- r = PEPrintReport(s, 1, 1, "A Preview Window", _
- xleft, xtop, xwidth, xheight, 0, 0)
- End Sub
- Private Sub Command3_Click()
- h = PEOpenPrintJob(s)
- r = PEOutputToPrinter(h, 1)
- r = PEOutputToWindow(h, "Custom Report", _
- xleft, xtop, xwidth, xheight, 0, 0)
- r = PEStartPrintJob(h, 1)
- End Sub
- Private Sub Command4_Click()
- PECloseWindow (h)
- PEClosePrintJob (h)
- End Sub
-